<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>登录</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<script type="text/javascript">
		function submitBase(handle){
			var form = document.getElementById("form");
			if(handle=="login"){
				form.action="base-login.do";
				form.submit();
			}else if(handle=="register"){
				form.action="base-register.do";
				form.submit();
			}	
		}
	</script>
  </head>
  
  <body>
   <form action="" method="post" id="form">
   		username:<input type="text" name="baseDTO.name" id="username" ><br>
   		password:<input type="password" name="baseDTO.password" id="password"><br>
   		<input type="button" value="登录" onclick="submitBase('login');">
   		<input type="button" value="注册" onclick="submitBase('register');">
   </form>
   <span style="color: red">${request.errors.baseError[0] }</span>
  </body>
</html>
